package com.lhb.ojjudgeservice.judge.controller.inner;

import com.lhb.ojjudgeservice.judge.JudgeService;
import com.lhb.ojmodel.model.entity.QuestionSubmit;
import com.lhb.ojserviceclient.feignclient.JudgeFeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {
    @Resource
    private JudgeService judgeService;

    /*
    * 进行判题
    * */
    @Override
    @GetMapping("/get/id")
    public QuestionSubmit doJudge(@RequestParam("id") long questionSubmitId) {
        return judgeService.doJudge(questionSubmitId);
    }
}
